25
|
How can I determine if the giving input object is a file, folder (sample 2)
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
alert( Thumbnail1.FormatABC("`The ` + fname + ` ` + ( ffolder = -1 ? `is a folder` : ( ffolder = +1 ? `is a file` : `is not found` ) ) + `.`",null,null,null,"C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg") );
alert( Thumbnail1.FormatABC("`The ` + fname + ` ` + ( ffolder = -1 ? `is a folder` : ( ffolder = +1 ? `is a file` : `is not found` ) ) + `.`",null,null,null,"C:\\Program Files\\Exontrol\\ExThumbnail\\Sample") );
alert( Thumbnail1.FormatABC("`The ` + ffile + ` ` + ( ffolder = -1 ? `is a folder` : ( ffolder = +1 ? `is a file` : `is not found` ) ) + `.`",null,null,null,"C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo2.jpg") );
}
</SCRIPT>
</BODY>
|
24
|
Is there any function to get automatically the size of the file in KB, MB or GB
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "`Size: <b>` + fsizeF";
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
23
|
How can I get the size of the file (GB)
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "`Size: <b>` + ( (fsize/1024/1024/1024) format `` ) + ` GB(s)`";
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
22
|
How can I get the size of the file (MB)
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "`Size: <b>` + ( (fsize/1024/1024) format `` ) + ` MB(s)`";
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
21
|
How can I get the size of the file (KB)
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "`Size: <b>` + ( (fsize/1024) format `` ) + ` KB(s)`";
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
20
|
How can I get the size of the file (bytes)
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "`Size: <b>` + fsize + ` byte(s)`";
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
19
|
How do I get the time the file was created, opened and modified
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.Padding = "";
Thumbnail1.Alignment = 33;
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "`Created: <b><r>` + date(fcreated - bias/24/60) + `</b>` + `<br>` + `Modified: <b><r>` + date(fmodified - bias/24/60) + `</b>`+" +
" `<br>` + `Last Opened: <r><b>` + date(fopened - bias/24/60) + `</b>`";
Thumbnail1.SingleCaption = Thumbnail1.Caption;
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
18
|
How can I display the date/time the file/folder was last opened
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "`Opened: <b>` + date(fopened - bias/24/60)";
Thumbnail1.SingleCaption = Thumbnail1.Caption;
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
17
|
How can I display the date/time the file/folder was last modified
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "`Modified: <b>` + date(fmodified - bias/24/60)";
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
16
|
How can I display the date/time the file/folder was created
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "`Created: <b>` + longdate(date(fcreated - bias/24/60)) + ` ` + time(date(fcreated - bias/24/60))";
Thumbnail1.SingleCaption = Thumbnail1.Caption;
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
15
|
How can I get the alternate name of the file
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "`Alternate Name: <b>` + faname + `</b>, Name: <b>` + fname";
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
14
|
How can I get the file's extension
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "`Extension: <b>` + fext";
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
13
|
I've noticed the Caption property can use expressions, based on the file, the question is how can I use that feature without the Caption property
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
alert( Thumbnail1.FormatABC("ffile +` ` + ( len(fname) ? `this is a file/folder`: `not found`)",null,null,null,"C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg") );
}
</SCRIPT>
</BODY>
|
12
|
Can I determine if a file/thumbnail exists (sample 1)
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.AddInputFiles("C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg");
Thumbnail1.AddInputFiles("sss");
Thumbnail1.Caption = "len(fname) ? `this is a file/folder` : `<fgcolor=FF0000><u>not found`";
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
11
|
How can I display the name of the file
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "`Name: <b>` + fname";
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
10
|
How can I display the full name of the file
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
Thumbnail1.Caption = "ffile";
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
9
|
How can I display the index/number of files/thumbnails
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BeginUpdate();
Thumbnail1.AcceptFolders = -1;
Thumbnail1.AddInputFiles("C:\\Program Files\\Exontrol\\ExThumbnail\\Sample");
Thumbnail1.Caption = "(findex + 1) + ` of ` + fcount";
Thumbnail1.EndUpdate();
}
</SCRIPT>
</BODY>
|
8
|
How can I add more files ( sample 3 )
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.AddInputFiles("C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg");
Thumbnail1.AddInputFiles("C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\device.png");
}
</SCRIPT>
</BODY>
|
7
|
How can I add more files ( sample 2 )
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg\\r\\nC:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\logo.png\\r\" +
"\nC:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\cordova.png";
}
</SCRIPT>
</BODY>
|
6
|
How can I add more files ( sample 1 )
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.InputFile = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg\\r\\nC:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\EndangeredAn" +
"imals.png";
}
</SCRIPT>
</BODY>
|
5
|
How do I clear the control's content
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.InputFile = "";
}
</SCRIPT>
</BODY>
|
4
|
How can I add a file ( sample 3 )
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.AddInputFiles("C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg");
}
</SCRIPT>
</BODY>
|
3
|
How can I add a file ( sample 2 )
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.InputFiles = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
}
</SCRIPT>
</BODY>
|
2
|
How can I add a file ( sample 1 )
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.InputFile = "C:\\Program Files\\Exontrol\\ExThumbnail\\Sample\\elogo.jpg";
}
</SCRIPT>
</BODY>
|
1
|
How do I change the control's background color
<BODY onload="Init()">
<OBJECT CLASSID="clsid:44BA596F-E225-476B-81B1-3BDE56AC595A" id="Thumbnail1"></OBJECT>
<SCRIPT LANGUAGE="JScript">
function Init()
{
Thumbnail1.BackColor = 15790320;
}
</SCRIPT>
</BODY>
|